package org.example.entity;

import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

/**
 * TODO 类功能介绍及重点或容易混淆点的说明。
 *
 * @author: 龙小南
 * @Date: 2023/5/20 10:18
 * @Version 1.0[当前版本号]
 *
 * @version 1.0 2023/5/20 10:18 龙小南 新建类[说明]
 */

public class User {
    @NotNull(message = "id不能为空")
    @Positive(message = "主键必须大于0")
    private Long id;
    @NotBlank(message = "姓名不能为空")
    private String name;
    private Integer age;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
